# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=dleyna-server
pkgver=0.6.0
pkgrel=1
pkgdesc="Library to discover, browse and manipulate Digital Media Servers"
arch=(x86_64)
url="http://01.org/dleyna"
license=(LGPL2.1)
depends=(dleyna-connector-dbus gupnp-av gupnp-dlna libsoup)
makedepends=(git)
_commit=776950d5d96ac9dbf5c5c47bde8ac06f50a3cf46  # tags/0.6.0
source=("git+https://github.com/01org/dleyna-server#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --disable-static --libexecdir=/usr/lib/$pkgname
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
